The transmission of a serial signal has a certain number of constraints that are imposed by the various serial interface standards. Among these constraints, attempts are made to insure that the clock can be recovered from the signal by the receiving circuit, and that the signal has a DC component that varies little around its mid-excursion. In more recent interfaces, where speeds can exceed 1 gigabit/s, the standards moreover require the signal to produce little electromagnetic interference.
To meet these constraints, various line encoding techniques are used, including 8b/10b code (Ethernet, SATA, FireWire, USB 3), 64b/67b code (Interlaken) and polarity bit codes of generic type Nb/(N+1)b. These techniques are sometimes associated with scrambling using pseudo-random noise in order to reduce electromagnetic interference (as for the USB 3 standard).
Line encoding can likewise be characterized by a parameter called running disparity (RD). Running disparity is the running difference between the number of bits at 1 and the number of bits at 0 for a transmission in progress. It can be seen as a counter that is incremented when the current bit is at 1 and decremented when the current bit is at 0. When the running disparity increases in terms of absolute value, the eye diagram of the transitions closes, increasing the risk of transmission errors. It is therefore desirable for the running disparity to be limited.
The 8b/10b code provides running disparity limited to ±3. This value, which is particularly low, is obtained in return for a loss of useful bandwidth of 25% (2 redundant bits for 8 useful bits). A polarity bit code of Nb/(N+1)b type has a disparity limited to ±(N+N/2) in return for a loss of useful bandwidth of 1/N. The 64b/67b code used in the Interlaken protocol is a variation of the 64b/65b code and has a running disparity limited to ±96.
Line encoding operations introduce a compromise to be defined between the decrease in running disparity and improvement in the use of bandwidth.